home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / DOCZ16.ZIP;1 / DOCZ.LIF / DOCSTASH < prev    next >
Encoding:
Text File  |  1994-04-24  |  1.5 KB  |  53 lines

  1. # ***************************************************************************
  2. #   docstash
  3. #
  4. #   this Bourne Shell script demonstrates the automation of the DOCZ
  5. #   System with SCCS version control.
  6. #
  7. #    This script can be called from DOCLIS using the -c option, as in
  8. #       -c=docstash
  9. #
  10. #    $1=Library name
  11. #    $2=Module name
  12. #    $3=File name
  13. #    $4=Comment
  14. # ***************************************************************************
  15.  
  16. # test for required arguments
  17. if test "$1" -a "$2" -a "$3"
  18. then
  19.    if test -f $3
  20.    then
  21.       LIBNAME=`echo $1 | tr "[a-z]" "[A-Z]"`
  22.       # see if previous SCCS file
  23.       if test -f $DOCSRC/$LIBNAME/s.$3
  24.       then
  25.          # test for comment argument
  26.          if test "$4"
  27.          then
  28.             echo Updating SCCS file for $3
  29.             # check for reservations
  30.             if test ! -f $DOCSRC/$LIBNAME/p.$3
  31.             then
  32.                get -e -g $DOCSRC/$LIBNAME/s.$3
  33.             fi
  34.             delta "-y$4" $DOCSRC/$LIBNAME/s.$3
  35.          else
  36.             echo "Comment required for update!" >&2
  37.             exit 1
  38.          fi
  39.       else
  40.          echo Creating new SCCS file for $3
  41.          rm $DOCSRC/$LIBNAME/$3
  42.          admin -i$3 "-y`docget $2 $3 des`" $DOCSRC/$LIBNAME/s.$3
  43.          rm $3
  44.       fi
  45.    else
  46.       echo "DOCSTASH: cannot find $3"
  47.    fi
  48. else
  49.    echo "docstash <library> <module> <file> <comment>"
  50. fi
  51.  
  52. # ***************************************************************************
  53.